#include "lista.h"

#include <iostream>

void Lista::adauga(nod *&prim,int x){	
	nod *nou=new nod;
  nou->info=x;
  nou->leg=prim;
  prim=nou;
}
void Lista::citeste(){
  int x;
	char ch;
	std::cout<<"Adaugi?(D/N)= ";
	std::cin>>ch;
  while(ch=='d')
	{
		std::cout<<"Introdu valoarea= ";
		std::cin>>x;
		adauga(p1,x);
		std::cout<<"Adaugi?(D/N)= ";
		std::cin>>ch;
	}
}
void Lista::afisare(){
	void afis(nod *prim)
{nod *p=prim;
 while(p){cout<<p->info<<" ";p=p->leg;}
 cout<<endl;
}


}
